<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>圣杯布局</title>
    <style>
        .main {
            border: 1px solid gray;
            padding: 0 120px;
            /*比left&right的宽多一点，以便留出空隙*/
        }

        .main::after {
            content: '';
            display: block;
            clear: both;
        }

        .main>div {
            height: 220px;
            text-align: center;
            color: white;
            float: left;
            background: #b4a078;
        }

        .main .left,
        .main .right {
            position: relative;
            width: 110px;
        }

        .main .left {
            left: -120px;
            /*.main padding左右的宽度*/
            margin-left: -100%;
            background: red;
        }

        .main .middle {
            width: 100%;

        }

        .main .right {
            right: -120px;
            /*.main padding左右的宽度*/
            margin-left: -110px;
            background: green
        }
    </style>
</head>

<body>
    <div class="main">
        <div class="middle">middle</div>
        <div class="left">left</div>
        <div class="right">right</div>
    </div>
</body>

</html>